package com.turing.service.impl;

import com.turing.domain.GoodsSpuInfo;
import com.turing.mapper.GoodsSpuInfoMapper;
import com.turing.service.IGoodsSpuInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 *
 */
@Service
public class GoodsSpuInfoServiceImpl implements IGoodsSpuInfoService {

    @Autowired
    private GoodsSpuInfoMapper goodsSpuInfoMapper;

    @Override
    public List<GoodsSpuInfo> selectAll() {
        return goodsSpuInfoMapper.selectList();
    }

    @Override
    public GoodsSpuInfo selectById(Long id) {
        return goodsSpuInfoMapper.selectByPrimaryKey(id);
    }

    @Override
    public int insertOne(GoodsSpuInfo goodsSpuInfo) {
        return goodsSpuInfoMapper.insertSelective(goodsSpuInfo);
    }

    @Override
    public int updateById(GoodsSpuInfo goodsSpuInfo) {
        return goodsSpuInfoMapper.updateByPrimaryKeySelective(goodsSpuInfo);
    }

    @Override
    public int deleteByIds(Long[] ids) {
        return goodsSpuInfoMapper.deleteByPrimaryKey(ids);
    }

    @Override
    public List<GoodsSpuInfo> selectPage(GoodsSpuInfo goodsSpuInfo) {
        return goodsSpuInfoMapper.selectPage(goodsSpuInfo);
    }
}
